package com.payment.web.controller.app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.payment.common.base.AjaxResult;
import com.payment.system.service.IAppVersionService;

/**
 * @author fuzhili
 * @Description: app端 版本升级
 *
 * @date 2019/1/28 9:07
 */
@Controller
@RequestMapping("/app/version")
public class VersionController {
    @Autowired
    private IAppVersionService appVersionService;


	/**
	 * 获取当前最新版本号
	 * @param type 0 ios,1 安卓
	 * @return
	 */
	@RequestMapping("/getVersion")
	@ResponseBody
	public AjaxResult getVersion(String type,String versionNo) {

		return appVersionService.getVersion(type,versionNo);
	}

	/**
	 * 获取手机端是否上架
	 * @param systemType
	 * @return
	 */
	@PostMapping("/getIsOnline")
	@ResponseBody
	public AjaxResult getIsOnline(String systemType) {
		return appVersionService.getIsOnline(systemType);
	}
}
